package com.yanmaohu.nikita.data.expression;

import com.yanmaohu.nikita.data.operator.BitOperator;

/**
 * @author Bright Lee
 */
public final class BitExpression extends Expression {

    private BitOperator bitOperator;
    private final Expression a;
    private final Expression b;

    public BitExpression(int beginIndex, int endIndex, BitOperator bitOperator, Expression a, Expression b) {
        super(beginIndex, endIndex);
        this.bitOperator = bitOperator;
        this.a = a;
        this.b = b;
    }

    public BitExpression(int beginIndex, int endIndex, BitOperator bitOperator, Expression a) {
        this(beginIndex, endIndex, bitOperator, a, null);
    }

    public BitOperator getBitOperator() {
        return bitOperator;
    }

    public Expression getA() {
        return a;
    }

    public Expression getB() {
        return b;
    }

}
